/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package jwu2.core;

/**
 *
 * @author jbk
 */
public interface TaskListener {
    /**
     * Called when a task completes
     */
    public void onCompletion(Task task);

    /**
     * Called when a task goes inactive because all its subtasks
     * have been completed
     */
    public void onInactive(Task task);

    /**
     * Called when a logmessage is added to this task
     */
    public void onLog(Task task, String logMessage);
    
    /**
     * Called when a new subtask is added
     * @param task The originator of this event
     * @param subTask The new task
     */
    public void onNewSubTask(Task task, Task subTask);
    
    /**
     * Called when a task has had its progress updated.
     * @param task The task that has had its progress updated
     * @param origin The task where this event originally occoured
     */
    public void onProgressUpdate(Task task, Task origin);
}
